<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<body>
<div align="center" id="pagediv" th:fragment="pagination">
    总记录条数:<span th:text="${p.total}"></span> 每页显示:<select name="pageSize">
    <option value="5">5条</option>
    <option value="10" >10条</option>
    <option value="20" >20条</option>
</select><span th:text="${p.pageSize}"></span> 总页数:<span th:text="${p.pages}"></span>
    <button th:class="|layui-btn layui-btn-xs ${p.pageNum==1?'layui-btn-disabled':''}|" title="1" th:disabled="${p.pageNum==1?'true':'false'}">首页</button>
    <button th:class="|layui-btn layui-btn-xs ${p.pageNum==1?'layui-btn-disabled':''}|" th:title="${p.prePage}" th:disabled="${p.pageNum==1?'true':'false'}">上一页</button>
    <label>当前页:<input name="pageNum" th:value="${p.pageNum}" size="3"></label>
    <button th:class="|layui-btn layui-btn-xs ${p.pageNum==p.pages?'layui-btn-disabled':''}|" th:title="${p.nextPage}" th:disabled="${p.pageNum==p.pages?'true':'false'}" >下一页</button>
    <button th:class="|layui-btn layui-btn-xs ${p.pageNum==p.pages?'layui-btn-disabled':''}|" th:title="${p.pages}" th:disabled="${p.pageNum==p.pages?'true':'false'}">末页</button>
</div>
</body>
</html>